#include <linux/init.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include "platform_data_special.h"
void drv_hello_release(struct device *dev)
{
	printk("---%s---\r\n",__FUNCTION__);
}
struct resource	led_resource[]={
	[0]={
			.start 	= 0x54004000,		//起始地址
			.end 	= 0x540043ff,			//结束地址
			.name 	= "GPIOZ",			//资源名称
			.flags 	= IORESOURCE_MEM,	//地址资源
		},
};
struct Platform_data_spex led_spex={
	.name = "drv_led",
	.minum = 1,
	.MODER_SET = 0x15<<10,
	.MODER_RESET= 0x3f<<10,
	.ODR_SET = 0x07<<5,
	.ODR_RESET = 0x07<<5,
};

struct platform_device pdev={
	.name = "drv_hello",
	.id = -1,
	.dev = {
		.release = drv_hello_release,
		.platform_data =&led_spex,
	},
	.resource = led_resource,
	.num_resources = ARRAY_SIZE(led_resource),
};
static int __init dev_hello_init(void)
{
	int ret =0;
	printk("---%s---\r\n",__FUNCTION__);
	platform_device_register(&pdev);
	return ret;
}
void __exit dev_hello_exit(void)
{
	printk("---%s---\r\n",__FUNCTION__);
	platform_device_unregister(&pdev);
}

module_init(dev_hello_init);
module_exit(dev_hello_exit);
MODULE_LICENSE("GPL");

